/**
 * 
 */
package net.com.sunkey.serverlogic;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author kohachiro
 *
 */
public class PluginData {
	private final String name;
	private final String action;
	private final Map<String, String> properties;
	/**
	 * 
	 */
	public PluginData(String name,String action) {
		this.name=name;
		this.action=action;
		properties = new ConcurrentHashMap<String, String>();
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @return the action
	 */
	public String getAction() {
		return action;
	}
	/**
	 * @param key
	 * @param value
	 */
	public void addProperty(String key, String value) {
		properties.put(key, value);
	}
	/**
	 * @param key
	 */
	public void removeProperty(String key) {
		properties.remove(key);
	}
	/**
	 * @return
	 */
	public Map<String, String> getProperties() {
		return properties;
	}
	/**
	 * @param key
	 * @return
	 */
	public String getProperty(String key) {
		return properties.get(key);
	}
}
